<?php
	header("Content-Type: text/html;charset=utf-8");
	include("function/_nosql.php");
	include("function/function.php");
	
	$newsid = trim($_REQUEST['newsid']);
	if(is_numeric($newsid)){
		$sql="select * from kboy_news where news_language=1 and id=$newsid";
		$rows=mysql_query($sql);
		$nums=mysql_num_rows($rows);
		if($nums>0){
			$rs=mysql_fetch_array($rows);
				$news_title = $rs['news_title'];
				$news_writer = $rs['news_writer'];
				$news_from = $rs['news_from'];
				$news_pic = $rs['news_pic'];
				$news_bigclass = $rs['news_bigclass'];
				$classid = $rs['news_bigclass'];
				$news_addtime = $rs['news_addtime'];
				$news_content = stripslashes($rs['news_content']);
				$news_keywords = $rs['news_keywords'];
				$classid = $rs['news_bigclass'];
				$news_hit = $rs['news_hit'];
				$news_tourls = $rs['news_tourls'];
		}else{
			echo erro("该信息已被删除或不存在");
		}
	}else{
		echo erro("该信息已被删除或不存在");
	}
	
	$sql="select * from kboy_bigclass where id=$news_bigclass";
	$rows=mysql_query($sql);
	$nums=mysql_num_rows($rows);
	if($nums>0){
		$rs=mysql_fetch_array($rows);
		$bigclass_cn = $rs['bigclass_cn'];
		
	}else{
		echo erro("该信息已被删除或不存在");
	}
	
	if($news_tourls){ // 设置转页
		echo "<meta http-equiv=\"Refresh\" content=\"0;URL=".$news_tourls."\" />";
		echo re($news_tourls);
	}
	
	// 获取父ID串
	$replace_str = "1,2,3";
	getFatherID($classid,"");
	$getFatherID = $getFatherID . ",";
	$EXarr = explode(',',$replace_str);
	foreach($EXarr as $u){
		$rep_str = ','.$u.",";
		$getFatherID = str_replace($rep_str,'',$getFatherID);
	}
	$getFatherID = rtrim(ltrim($getFatherID,','),',');
	if(strlen($getFatherID)>0){
		$Farr = array_reverse(explode(",",$getFatherID));
		$FarrNum = $Farr[0];
	}
	mysql_query("update kboy_news set news_hit = news_hit + 1 where id=$newsid");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?= $news_title ?>_<?= $web_titles?></title>
<meta name="Keywords" content="<?= $news_title ?>,<?= $web_keywords ?>" />
<meta name="Description" content="<?= $web_description ?>" />
<link rel="stylesheet" href="css/common.css"/>
<link rel="stylesheet" href="css/style.css"/>
<script type="text/javascript" src="js/baidutongji.js"></script>
<script type="text/javascript" src="js/laydate/laydate.js"></script>
</head>
<body>
    <!--top-bar begin-->
	<? include("_include.top.topbar.php") ?>
    <!--top-bar end-->
    <!--header begin-->
	<? include("_include.top.navbar.php") ?>
    <!--header end-->
    <!--banner begin-->
    <div class="help-ban">
        <div class="help-pic">
            <img src="images/help_pic1.jpg" alt=""/>
        </div>
        <div class="member-ads">
            <img src="images/help_pic2.png" alt="">
        </div>
    </div>
    <!--banner end-->
    <!--help center begin-->
    <div class="help_wrap">
        <div class="content">
            <div class="helpc_l">
			<?php
					$bigclass_sql = "select * from kboy_bigclass where id in(108,109,110,111) order by bigclass_order asc, id asc";
					$bigclass_rows = mysql_query($bigclass_sql);
					while($bigclass_rs = mysql_fetch_array($bigclass_rows)){
			?>
                <dl class="hc_item">
                    <dt><?=$bigclass_rs['bigclass_cn']?></dt>
			<?php
						$news_sql = "select * from kboy_news where news_bigclass=".$bigclass_rs['id']."  order by news_top desc,news_order desc, id desc";
						$news_rows = mysql_query($news_sql);
						while($news_rs = mysql_fetch_array($news_rows)){
			?>
                    <dd><a href="help.php?newsid=<?=$news_rs['id']?>" class="items"><i></i><span><?=$news_rs['news_title']?></span><em></em></a></dd>
			<?php
						}
			?>
                </dl>
			<?php
					$i ++ ;
					}
			?>
            </div>
            <div class="helpc_r">
                <div class="helpc_title"><?=$news_title?></div>
                <div class="helpc_con">
					<?=$news_content?>
                </div>
            </div>
        </div>
    </div>
    
    <!--help center end-->
    <!--foot begin-->
	<? include("_include.bottom.footbar.php") ?>
    <!--foot begin-->
    <!--左侧悬浮 begin-->
	<? include("_include.bottom.leftbar.php") ?>
    <!--左侧悬浮 end-->
    <!--右侧悬浮导航 begin-->
	<? include("_include.bottom.rightbar.php") ?>
    <!--右侧悬浮导航 end-->
    <script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="js/jquery.SuperSlide.2.1.1.js"></script>
    <script type="text/javascript" src="js/main.js"></script>
    <script type="text/javascript" src="js/sq.js"></script>
</body>
</html>

